***********************************************************************************
* THE LOSER'S LONG CURSE: HOW EXPOSURE TO CLASS CONFLICT SHAPES ELECTION OUTCOMES *
***********************************************************************************

* This file reproduces the following tables and figures in the online appendix:
* Figures OA1-OA10, Figures OA13-OA14, and Tables OA1-OA9.

* For Figures OA10-OA12 and Table OA10, see long_run_analysis.do - for the analyses
* in the main text, see main_analyses.do!

********************************************************************************

* Set up working folders --- NB. Replace these with your own paths!

global data " "
global tables " "
global figures " "

********************************************************************************

* Open the data set

use "$data/MM_data_main.dta", clear

********************************************************************************

* Figures OA1-OA6

gen post = 0
replace post = 1 if year >= 1917

preserve

bysort municipality post: egen mean_red_parties = mean(red_parties)

duplicates drop municipality post, force

sort municipality post

xtset munig post

gen change = mean_red_parties-L.mean_red_parties

reg change dead, robust

local b1: display %4.3f _b[dead]
local se2: display %4.3f _se[dead]
local t = _b[dead]/_se[dead]
local p: display %4.3f 2*ttail(e(df_r),abs(`t'))

binscatter change dead, scheme(plotplain) ///
	ytitle("Δ Left-wing parties' vote share") xtitle("All casualties")  note("Slope coefficient = `b1' (`se2'),  {it:p} = `p'")
graph export "$figures/figure_OA1.pdf", as(pdf) replace

reg change insurgency, robust

local b1: display %4.3f _b[insurgency]
local se2: display %4.3f _se[insurgency]
local t = _b[insurgency]/_se[insurgency]
local p: display %4.3f 2*ttail(e(df_r),abs(`t'))

binscatter change insurgency, scheme(plotplain) subtitle("Panel A: Red casualties and change in left support", position(11)) ///
	ytitle("Δ Left-wing parties' vote share") xtitle("Red casualties")  note("Slope coefficient = `b1' (`se2'),  {it:p} = `p'")
graph export "$figures/figure_OA2A.pdf", as(pdf) replace

reg change whitedead, robust

local b1: display %4.3f _b[whitedead]
local se2: display %4.3f _se[whitedead]
local t = _b[whitedead]/_se[whitedead]
local p: display %4.3f 2*ttail(e(df_r),abs(`t'))

binscatter change whitedead, scheme(plotplain) subtitle("Panel B: White casualties and change in left support", position(11)) ///
	ytitle("Δ Left-wing parties' vote share") xtitle("White casualties")  note("Slope coefficient = `b1' (`se2'),  {it:p} = `p'") xlabel(,format(%9.2f))
graph export "$figures/figure_OA2B.pdf", as(pdf) replace

reg change dead if red_region == 1, robust

local b1: display %4.3f _b[dead]
local se2: display %4.3f _se[dead]
local t = _b[dead]/_se[dead]
local p: display %4.3f 2*ttail(e(df_r),abs(`t'))

binscatter change dead if red_region == 1, scheme(plotplain) ///
	ytitle("Δ Left-wing parties' vote share") xtitle("All casualties")  note("Slope coefficient = `b1' (`se2'),  {it:p} = `p'")
graph export "$figures/figure_OA3.pdf", as(pdf) replace

reg change insurgency if red_region == 1, robust

local b1: display %4.3f _b[insurgency]
local se2: display %4.3f _se[insurgency]
local t = _b[insurgency]/_se[insurgency]
local p: display %4.3f 2*ttail(e(df_r),abs(`t'))

binscatter change insurgency if red_region == 1, scheme(plotplain) subtitle("Panel A: Red casualties and change in left support", position(11)) ///
	ytitle("Δ Left-wing parties' vote share") xtitle("Red casualties")  note("Slope coefficient = `b1' (`se2'),  {it:p} = `p'")
graph export "$figures/figure_OA4A.pdf", as(pdf) replace

reg change whitedead if red_region == 1, robust

local b1: display %4.3f _b[whitedead]
local se2: display %4.3f _se[whitedead]
local t = _b[whitedead]/_se[whitedead]
local p: display %4.3f 2*ttail(e(df_r),abs(`t'))

binscatter change whitedead if red_region == 1, scheme(plotplain) subtitle("Panel B: White casualties and change in left support", position(11)) ///
	ytitle("Δ Left-wing parties' vote share") xtitle("White casualties")  note("Slope coefficient = `b1' (`se2'),  {it:p} = `p'") xlabel(,format(%9.2f))
graph export "$figures/figure_OA4B.pdf", as(pdf) replace

reg change dead if red_region == 0, robust

local b1: display %4.3f _b[dead]
local se2: display %4.3f _se[dead]
local t = _b[dead]/_se[dead]
local p: display %4.3f 2*ttail(e(df_r),abs(`t'))

binscatter change dead if red_region == 0, scheme(plotplain) ///
	ytitle("Δ Left-wing parties' vote share") xtitle("All casualties")  note("Slope coefficient = `b1' (`se2'),  {it:p} = `p'")
graph export "$figures/figure_OA5.pdf", as(pdf) replace

reg change insurgency if red_region == 0, robust

local b1: display %4.3f _b[insurgency]
local se2: display %4.3f _se[insurgency]
local t = _b[insurgency]/_se[insurgency]
local p: display %4.3f 2*ttail(e(df_r),abs(`t'))

binscatter change insurgency if red_region == 0, scheme(plotplain) subtitle("Panel A: Red casualties and change in left support", position(11)) ///
	ytitle("Δ Left-wing parties' vote share") xtitle("Red casualties")  note("Slope coefficient = `b1' (`se2'),  {it:p} = `p'")
graph export "$figures/figure_OA6A.pdf", as(pdf) replace

reg change whitedead if red_region == 0, robust

local b1: display %4.3f _b[whitedead]
local se2: display %4.3f _se[whitedead]
local t = _b[whitedead]/_se[whitedead]
local p: display %4.3f 2*ttail(e(df_r),abs(`t'))

binscatter change whitedead if red_region == 0, scheme(plotplain) subtitle("Panel B: White casualties and change in left support", position(11)) ///
	ytitle("Δ Left-wing parties' vote share") xtitle("White casualties")  note("Slope coefficient = `b1' (`se2'),  {it:p} = `p'") xlabel(,format(%9.2f))
graph export "$figures/figure_OA6B.pdf", as(pdf) replace

restore

********************************************************************************
	
* Table OA1
	
est clear

reg red_parties c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) c.year#i.munig c.year#i.munig, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.dead##i.post, absorb(munig year#laanig i.munig#c.year year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) c.year#i.munig, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.insurgency##i.post, absorb(munig year#laanig i.munig#c.year year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) c.year#i.munig, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.whitedead##i.post, absorb(munig year#laanig i.munig#c.year year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) c.year#i.munig if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.dead##i.post if red_region == 1, absorb(munig year#laanig i.munig#c.year year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) c.year#i.munig if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.insurgency##i.post if red_region == 1, absorb(munig year#laanig i.munig#c.year year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) c.year#i.munig if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.whitedead##i.post if red_region == 1, absorb(munig year#laanig i.munig#c.year year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) c.year#i.munig if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.dead##i.post if red_region == 0, absorb(munig year#laanig i.munig#c.year year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) c.year#i.munig if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.insurgency##i.post if red_region == 0, absorb(munig year#laanig i.munig#c.year year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) c.year#i.munig if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.whitedead##i.post if red_region == 0, absorb(munig year#laanig i.munig#c.year year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

esttab est* using "$tables/table_OA1.tex", replace  mgroups("Entire country" "Red Finland" "White Finland",  pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) )  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(1.post#c.dead 1.post#c.insurgency 1.post#c.whitedead) coeflabels(1.post#c.dead "Civil war casualties $\times$ 1[Year $\geq$ 1917]" ///
	1.post#c.insurgency "Red casualties $\times$ 1[Year $\geq$ 1917]" 1.post#c.whitedead "White casualties $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{10}{c}} \toprule) ///
	postfoot(\bottomrule \end{tabular})			
	
********************************************************************************

* Figure OA7

levelsof year, local(level)
foreach l of local level {
		gen treat_`l'=0
		replace treat_`l'=insurgency if year==`l'
	}

est clear

tempfile t1 t2
parmby "reghdfe red_parties treat_1910 treat_1911 treat_1913 treat_1917 treat_1919 treat_1922 treat_1924 treat_1927 treat_1929 treat_1930 treat_1933 treat_1936, a(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)

preserve
clear all
set obs 1
gen year =1916
gen estimate = 0
gen parm ="treat_1916"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^treat*")
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway (rcap min95 max95 yearstr, lwidth(medium) subtitle("Panel A: Red casualties and left vote share", position(11)) ylabel(,format(%9.0f)) scheme(plotplain) xsize(6) ysize(4) xtitle(Year, size(small))  yline(0, lcolor(black)) xline(1916.5, lcolor(black))  xline(1918, lcolor(black)) ytitle(Regression coefficient) ///
xlabel(1910 1911 1913 1916 1917 1919 1922 1924 1927 1929 1930 1933 1936, angle(vertical) labsize(small)) graphregion(color(white)) legend(off)) (connected estimate yearstr, msize(medium) msymbol(circle) mcolor(black))

graph save "$figures/insurgency_left.gph", replace

restore

drop treat*

levelsof year, local(level)
foreach l of local level {
		gen treat_`l'=0
		replace treat_`l'=whitedead if year==`l'
	}

tempfile t1 t2
parmby "reghdfe red_parties treat_1910 treat_1911 treat_1913 treat_1917 treat_1919 treat_1922 treat_1924 treat_1927 treat_1929 treat_1930 treat_1933 treat_1936, a(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)

preserve
clear all
set obs 1
gen year =1916
gen estimate = 0
gen parm ="treat_1916"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^treat*")
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway  (rcap min95 max95 yearstr, lwidth(medium) subtitle("Panel B: White casualties and left vote share", position(11)) ylabel(,format(%9.0f)) scheme(plotplain) xsize(6) ysize(4) xtitle(Year, size(small))  yline(0, lcolor(black)) xline(1916.5, lcolor(black))  xline(1918, lcolor(black)) ytitle(Regression coefficient) ///
xlabel(1910 1911 1913 1916 1917 1919 1922 1924 1927 1929 1930 1933 1936, angle(vertical) labsize(small)) graphregion(color(white)) legend(off)) (connected estimate yearstr, msize(medium) msymbol(circle) mcolor(black))

graph save "$figures/whites_left.gph", replace

graph combine "$figures/insurgency_left.gph" "$figures/whites_left.gph", cols(1) xsize(16) ysize(18) scheme(plotplain)
graph save "$figures/by_side_left.gph", replace
graph export "$figures/figure_OA7.pdf", as(pdf) replace

restore

********************************************************************************

* Figure OA8

drop treat* 

levelsof year, local(level)
foreach l of local level {
		gen treat_`l'=0
		replace treat_`l'=dead if year==`l'
	}

est clear

tempfile t1 t2
parmby "reghdfe red_parties treat_1910 treat_1911 treat_1913 treat_1917 treat_1919 treat_1922 treat_1924 treat_1927 treat_1929 treat_1930 treat_1933 treat_1936 if red_region == 1, a(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)

preserve
clear all
set obs 1
gen year =1916
gen estimate = 0
gen parm ="treat_1916"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^treat*")
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway  (rcap min95 max95 yearstr, lwidth(medium) subtitle("Panel A: Civil war casualties and left vote share, Red Finland", position(11)) ylabel(,format(%9.0f)) scheme(plotplain) xsize(6) ysize(4) xtitle(Year, size(small))  yline(0, lcolor(black)) xline(1916.5, lcolor(black))  xline(1918, lcolor(black)) ytitle(Regression coefficient) ///
xlabel(1910 1911 1913 1916 1917 1919 1922 1924 1927 1929 1930 1933 1936, angle(vertical) labsize(small)) graphregion(color(white)) legend(off)) (connected estimate yearstr, msize(medium) msymbol(circle) mcolor(black))

graph save "$figures/casualties_left_red_finland.gph", replace

restore
est clear

tempfile t1 t2
parmby "reghdfe red_parties treat_1910 treat_1911 treat_1913 treat_1917 treat_1919 treat_1922 treat_1924 treat_1927 treat_1929 treat_1930 treat_1933 treat_1936 if red_region == 0, a(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)

preserve
clear all
set obs 1
gen year =1916
gen estimate = 0
gen parm ="treat_1916"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^treat*")
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway  (rcap min95 max95 yearstr, lwidth(medium) subtitle("Panel B: Civil war casualties and left vote share, White Finland", position(11)) ylabel(,format(%9.0f)) scheme(plotplain) xsize(6) ysize(4) xtitle(Year, size(small))  yline(0, lcolor(black)) xline(1916.5, lcolor(black))  xline(1918, lcolor(black)) ytitle(Regression coefficient) ///
xlabel(1910 1911 1913 1916 1917 1919 1922 1924 1927 1929 1930 1933 1936, angle(vertical) labsize(small)) graphregion(color(white)) legend(off)) (connected estimate yearstr, msize(medium) msymbol(circle) mcolor(black))

graph save "$figures/casualties_left_white_finland.gph", replace

restore

graph combine "$figures/casualties_left_red_finland.gph" "$figures/casualties_left_white_finland.gph", cols(1) xsize(16) ysize(18) scheme(plotplain)
graph save "$figures/by_control_left.gph", replace
graph export "$figures/figure_OA8.pdf", as(pdf) replace	

********************************************************************************

* Figure OA9

drop treat*

levelsof year, local(level)
foreach l of local level {
		gen treat_`l'=0
		replace treat_`l'=insurgency if year==`l'
	}

est clear

tempfile t1 t2
parmby "reghdfe red_parties treat_1910 treat_1911 treat_1913 treat_1917 treat_1919 treat_1922 treat_1924 treat_1927 treat_1929 treat_1930 treat_1933 treat_1936 if red_region == 1, a(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)

preserve
clear all
set obs 1
gen year =1916
gen estimate = 0
gen parm ="treat_1916"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^treat*")
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway  (rcap min95 max95 yearstr, lwidth(medium) subtitle("Panel A: Red casualties and left vote share, Red Finland", position(11)) ylabel(,format(%9.0f)) scheme(plotplain) xsize(6) ysize(4) xtitle(Year, size(small))  yline(0, lcolor(black)) xline(1916.5, lcolor(black))  xline(1918, lcolor(black)) ytitle(Regression coefficient) ///
xlabel(1910 1911 1913 1916 1917 1919 1922 1924 1927 1929 1930 1933 1936, angle(vertical) labsize(small)) graphregion(color(white)) legend(off)) (connected estimate yearstr, msize(medium) msymbol(circle) mcolor(black))

graph save "$figures/insurgency_left_red_finland.gph", replace

restore

est clear

tempfile t1 t2
parmby "reghdfe red_parties treat_1910 treat_1911 treat_1913 treat_1917 treat_1919 treat_1922 treat_1924 treat_1927 treat_1929 treat_1930 treat_1933 treat_1936 if red_region == 0, a(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)

preserve
clear all
set obs 1
gen year =1916
gen estimate = 0
gen parm ="treat_1916"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^treat*")
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway  (rcap min95 max95 yearstr, lwidth(medium) subtitle("Panel B: Red casualties and left vote share, White Finland", position(11)) ylabel(,format(%9.0f)) scheme(plotplain) xsize(6) ysize(4) xtitle(Year, size(small))  yline(0, lcolor(black)) xline(1916.5, lcolor(black))  xline(1918, lcolor(black)) ytitle(Regression coefficient) ///
xlabel(1910 1911 1913 1916 1917 1919 1922 1924 1927 1929 1930 1933 1936, angle(vertical) labsize(small)) graphregion(color(white)) legend(off)) (connected estimate yearstr, msize(medium) msymbol(circle) mcolor(black))

graph save "$figures/insurgency_left_white_finland.gph", replace

restore

drop treat*

levelsof year, local(level)
foreach l of local level {
		gen treat_`l'=0
		replace treat_`l'=whitedead if year==`l'
	}

est clear

tempfile t1 t2
parmby "reghdfe red_parties treat_1910 treat_1911 treat_1913 treat_1917 treat_1919 treat_1922 treat_1924 treat_1927 treat_1929 treat_1930 treat_1933 treat_1936 if red_region == 1, a(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)

preserve
clear all
set obs 1
gen year =1916
gen estimate = 0
gen parm ="treat_1916"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^treat*")
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway  (rcap min95 max95 yearstr, lwidth(medium) subtitle("Panel C: White casualties and left vote share, Red Finland", position(11)) ylabel(,format(%9.0f)) scheme(plotplain) xsize(6) ysize(4) xtitle(Year, size(small))  yline(0, lcolor(black)) xline(1916.5, lcolor(black))  xline(1918, lcolor(black)) ytitle(Regression coefficient) ///
xlabel(1910 1911 1913 1916 1917 1919 1922 1924 1927 1929 1930 1933 1936, angle(vertical) labsize(small)) graphregion(color(white)) legend(off)) (connected estimate yearstr, msize(medium) msymbol(circle) mcolor(black))

graph save "$figures/white_casualties_left_red_finland.gph", replace

restore

est clear

tempfile t1 t2
parmby "reghdfe red_parties treat_1910 treat_1911 treat_1913 treat_1917 treat_1919 treat_1922 treat_1924 treat_1927 treat_1929 treat_1930 treat_1933 treat_1936 if red_region == 0, a(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)

preserve
clear all
set obs 1
gen year =1916
gen estimate = 0
gen parm ="treat_1916"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^treat*")
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway  (rcap min95 max95 yearstr, lwidth(medium) subtitle("Panel D: White casualties and left vote share, White Finland", position(11)) ylabel(,format(%9.0f)) scheme(plotplain) xsize(6) ysize(4) xtitle(Year, size(small))  yline(0, lcolor(black)) xline(1916.5, lcolor(black))  xline(1918, lcolor(black)) ytitle(Regression coefficient) ///
xlabel(1910 1911 1913 1916 1917 1919 1922 1924 1927 1929 1930 1933 1936, angle(vertical) labsize(small)) graphregion(color(white)) legend(off)) (connected estimate yearstr, msize(medium) msymbol(circle) mcolor(black))

graph save "$figures/white_casualties_left_white_finland.gph", replace

graph combine 	"$figures/insurgency_left_red_finland.gph" "$figures/insurgency_left_white_finland.gph" ///
	"$figures/white_casualties_left_red_finland.gph" "$figures/white_casualties_left_white_finland.gph", ///
	scheme(plotplain) xsize(16) ysize(9)
graph save "$figures/casualties_by_side_control.gph", replace
graph export "$figures/figure_OA9.pdf", as(pdf) replace

restore

********************************************************************************

* Table OA2

est clear

reg agrarian_party c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe agrarian_party c.dead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg agrarian_party c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe agrarian_party c.insurgency##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg agrarian_party c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe agrarian_party c.whitedead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg agrarian_party c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe agrarian_party c.dead##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg agrarian_party c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe agrarian_party c.insurgency##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg agrarian_party c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe agrarian_party c.whitedead##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg agrarian_party c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe agrarian_party c.dead##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg agrarian_party c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe agrarian_party c.insurgency##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg agrarian_party c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe agrarian_party c.whitedead##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

esttab est* using "$tables/table_OA2.tex", replace  mgroups("Entire country" "Red Finland" "White Finland",  pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) )  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(1.post#c.dead 1.post#c.insurgency 1.post#c.whitedead) coeflabels(1.post#c.dead "Civil war casualties $\times$ 1[Year $\geq$ 1917]" ///
	1.post#c.insurgency "Red casualties $\times$ 1[Year $\geq$ 1917]" 1.post#c.whitedead "White casualties $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{10}{c}} \toprule) refcat(1.post#c.dead "\textbf{Panel A:} Agrarian Party vote share", nolabel) ///
	postfoot("")	
	
est clear

reg right_wing c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe right_wing c.dead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg right_wing c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe right_wing c.insurgency##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg right_wing c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe right_wing c.whitedead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg right_wing c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe right_wing c.dead##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg right_wing c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe right_wing c.insurgency##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg right_wing c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe right_wing c.whitedead##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg right_wing c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe right_wing c.dead##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg right_wing c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe right_wing c.insurgency##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg right_wing c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe right_wing c.whitedead##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

esttab est* using "$tables/table_OA2.tex", append booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(1.post#c.dead 1.post#c.insurgency 1.post#c.whitedead) coeflabels(1.post#c.dead "Civil war casualties $\times$ 1[Year $\geq$ 1917]" ///
	1.post#c.insurgency "Red casualties $\times$ 1[Year $\geq$ 1917]" 1.post#c.whitedead "White casualties $\times$ 1[Year $\geq$ 1917]") nonumbers nodepvars nomtitle ///
	prehead("") ///
	postfoot(\bottomrule \end{tabular})	refcat(1.post#c.dead "\textbf{Panel B:} Right-wing parties' vote share", nolabel)

********************************************************************************

* Table OA3

preserve

keep if year == 1936

est clear

reg ikl dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m, beta
scalar beta2 = r(PT)[1,6]
eststo: reg ikl dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m, vce(robust)
estadd scalar beta2
estadd ysumm

reg ikl insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m, beta
scalar beta2 = r(PT)[1,6]
eststo: reg ikl insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m, vce(robust)
estadd scalar beta2
estadd ysumm

reg ikl whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m, beta
scalar beta2 = r(PT)[1,6]
eststo: reg ikl whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m, vce(robust)
estadd scalar beta2
estadd ysumm

reg ikl dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 1, beta
scalar beta2 = r(PT)[1,6]
eststo: reg ikl dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 1, vce(robust)
estadd scalar beta2
estadd ysumm

reg ikl insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 1, beta
scalar beta2 = r(PT)[1,6]
eststo: reg ikl insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 1, vce(robust)
estadd scalar beta2
estadd ysumm

reg ikl whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 1, beta
scalar beta2 = r(PT)[1,6]
eststo: reg ikl whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 1, vce(robust)
estadd scalar beta2
estadd ysumm

reg ikl dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 0, beta
scalar beta2 = r(PT)[1,6]
eststo: reg ikl dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 0, vce(robust)
estadd scalar beta2
estadd ysumm

reg ikl insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 0, beta
scalar beta2 = r(PT)[1,6]
eststo: reg ikl insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 0, vce(robust)
estadd scalar beta2
estadd ysumm

reg ikl whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 0, beta
scalar beta2 = r(PT)[1,6]
eststo: reg ikl whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m if red_region == 0, vce(robust)
estadd scalar beta2
estadd ysumm

esttab est* using "$tables/table_OA3.tex", replace mgroups("Entire country" "Red Finland" "White Finland",  pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) ) booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta2, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(dead insurgency whitedead) coeflabels(dead "Civil war casualties" ///
	insurgency "Red casualties" whitedead "White casualties") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{10}{c}} \toprule) ///
	postfoot(\bottomrule \end{tabular})
	
restore

********************************************************************************

* Table OA4

* Radical left

preserve

keep if year >= 1922 & year <= 1930

est clear

reg stvp dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year, beta
scalar beta2 = r(PT)[1,6]
eststo: reg stvp dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year, vce(robust)
estadd scalar beta2
estadd ysumm

reg stvp insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year, beta
scalar beta2 = r(PT)[1,6]
eststo: reg stvp insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year, vce(robust)
estadd scalar beta2
estadd ysumm

reg stvp whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year, beta
scalar beta2 = r(PT)[1,6]
eststo: reg stvp whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year, vce(robust)
estadd scalar beta2
estadd ysumm

reg stvp dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m  i.year if red_region == 1, beta
scalar beta2 = r(PT)[1,6]
eststo: reg stvp dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year if red_region == 1, vce(robust)
estadd scalar beta2
estadd ysumm

reg stvp insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year if red_region == 1, beta
scalar beta2 = r(PT)[1,6]
eststo: reg stvp insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year if red_region == 1, vce(robust)
estadd scalar beta2
estadd ysumm

reg stvp whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year if red_region == 1, beta
scalar beta2 = r(PT)[1,6]
eststo: reg stvp whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year if red_region == 1, vce(robust)
estadd scalar beta2
estadd ysumm

reg stvp dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m  i.year if red_region == 0, beta
scalar beta2 = r(PT)[1,6]
eststo: reg stvp dead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year if red_region == 0, vce(robust)
estadd scalar beta2
estadd ysumm

reg stvp insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year if red_region == 0, beta
scalar beta2 = r(PT)[1,6]
eststo: reg stvp insurgency i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year if red_region == 0, vce(robust)
estadd scalar beta2
estadd ysumm

reg stvp whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year if red_region == 0, beta
scalar beta2 = r(PT)[1,6]
eststo: reg stvp whitedead i.laanig gini_1904 pop_present_all lat lon slope_mean altitude_m i.year if red_region == 0, vce(robust)
estadd scalar beta2
estadd ysumm

esttab est* using "$tables/table_OA4.tex", replace mgroups("Entire country" "Red Finland" "White Finland",  pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) ) booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta2, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(dead insurgency whitedead) coeflabels(dead "Civil war casualties" ///
	insurgency "Red casualties" whitedead "White casualties") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{10}{c}} \toprule) ///
	postfoot(\bottomrule \end{tabular})
	
restore
	
********************************************************************************

* Figures OA10-OA12 (Appendix E): See long_run_analysis.do

********************************************************************************

* Table OA5

// Generate some variables that will be needed

foreach var of varlist dead insurgency whitedead battle_red_share battle_white_share camp_red_share murdered_red_share murdered_white_share {
	summarize `var', detail
	gen high_`var' = (`var'>=r(p50)) if `var' != .
}

* Panel A: No control variables included	

est clear

eststo: reghdfe red_parties i.high_dead##i.post, absorb(munig year) vce(cluster munig)
estadd ysumm

eststo: reghdfe red_parties i.high_insurgency##i.post, absorb(munig year) vce(cluster munig)
estadd ysumm

eststo: reghdfe red_parties i.high_whitedead##i.post, absorb(munig year) vce(cluster munig)
estadd ysumm

esttab est* using "$tables/table_OA5.tex", replace booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean") ///
	fmt(0 2 2)) keep(1.high_dead#1.post 1.high_insurgency#1.post 1.high_whitedead#1.post) coeflabels(1.high_dead#1.post "1[High civil war casualties] $\times$ 1[Year $\geq$ 1917]" ///
	1.high_insurgency#1.post "1[High Red casualties] $\times$ 1[Year $\geq$ 1917]" 1.high_whitedead#1.post "1[High White casualties] $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{4}{c}} \toprule) refcat(1.high_dead#1.post "\textbf{Panel A:} No controls", nolabel) ///
	postfoot("")
	
* Panel B: Include control variables	

est clear

eststo: reghdfe red_parties i.high_dead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

eststo: reghdfe red_parties i.high_insurgency##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

eststo: reghdfe red_parties i.high_whitedead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

esttab est* using "$tables/table_OA5.tex", append  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) nonumbers ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean") ///
	fmt(0 2 2 2)) keep(1.high_dead#1.post 1.high_insurgency#1.post 1.high_whitedead#1.post) coeflabels(1.high_dead#1.post "1[High civil war casualties] $\times$ 1[Year $\geq$ 1917]" ///
	1.high_insurgency#1.post "1[High Red casualties] $\times$ 1[Year $\geq$ 1917]" 1.high_whitedead#1.post "1[High White casualties] $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead("") refcat(1.high_dead#1.post "\textbf{Panel B:} Controls included", nolabel) ///
	postfoot(\bottomrule \end{tabular})

********************************************************************************

* Figure OA13

drop treat*

levelsof year, local(level)
foreach l of local level {
		gen treat_`l'=0
		replace treat_`l'=high_dead if year==`l'
	}

tempfile t1 t2
parmby "reghdfe red_parties treat_1910 treat_1911 treat_1913 treat_1917 treat_1919 treat_1922 treat_1924 treat_1927 treat_1929 treat_1930 treat_1933 treat_1936, a(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)

preserve
clear all
set obs 1
gen year =1916
gen estimate = 0
gen parm ="treat_1916"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^treat*")
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway (rcap min95 max95 yearstr, lwidth(medium) ylabel(,format(%9.0f)) scheme(plotplain) xsize(6) ysize(4) xtitle(Year, size(small))  yline(0, lcolor(black)) xline(1918, lcolor(black)) xline(1916.5, lcolor(black)) ytitle(Regression coefficient) ///
xlabel(1910 1911 1913 1916 1917 1919 1922 1924 1927 1929 1930 1933 1936, angle(vertical) labsize(small)) graphregion(color(white)) legend(off)) (connected estimate yearstr, msize(medium) msymbol(circle) mcolor(black))

graph export "$figures/figure_OA13.pdf", as(pdf) replace
	
restore	

********************************************************************************

* Table OA6

est clear

eststo: reghdfe red_parties i.high_battle_red_share##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

eststo: reghdfe red_parties i.high_battle_white_share##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

esttab est* using "$tables/table_OA6.tex", replace booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean") ///
	fmt(0 2 2 2)) keep(1.high_battle_red_share#1.post 1.high_battle_white_share#1.post) coeflabels(1.high_battle_red_share#1.post "1[High Red battle casualties] $\times$ 1[Year $\geq$ 1917]" ///
	1.high_battle_white_share#1.post "1[High White battle casualties] $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{7}{c}} \toprule) refcat(1.high_battle_red_share#1.post "\textbf{Panel A:} Battle casualties]", nolabel) ///
	postfoot("")		
	
est clear

eststo: reghdfe red_parties i.high_murdered_red_share##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

eststo: reghdfe red_parties i.high_murdered_white_share##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

esttab est* using "$tables/table_OA6.tex", append  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean") ///
	fmt(0 2 2 2)) keep(1.high_murdered_red_share#1.post 1.high_murdered_white_share#1.post) coeflabels(1.high_murdered_red_share#1.post "1[High executed Reds] $\times$ 1[Year $\geq$ 1917]" ///
	1.high_murdered_white_share#1.post "1[High executed Whites] $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle nonumbers ///
	prehead("") refcat(1.high_murdered_red_share#1.post "\textbf{Panel B:} Executed", nolabel) ///
	postfoot("")
	
est clear

eststo: reghdfe red_parties i.high_camp_red_share##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

esttab est* using "$tables/table_OA6.tex", append  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean") ///
	fmt(0 2 2 2)) keep(1.high_camp_red_share#1.post) coeflabels(1.high_camp_red_share#1.post "1[High prison camp deaths] $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle nonumbers extracols(2) ///
	prehead("") refcat(1.high_camp_red_share#1.post "\textbf{Panel C:} Prison camp deaths", nolabel) ///
	postfoot("\bottomrule \end{tabular}")

********************************************************************************

* Table OA7

preserve

gen gini = gini_1938 if post == 1
replace gini = gini_1904 if post == 0
keep if gini != .
duplicates drop municipality post, force
	
est clear

eststo: reghdfe gini i.high_dead##i.post, absorb(munig post#laanig post#(c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

eststo: reghdfe gini i.high_insurgency##i.post, absorb(munig post#laanig post#(c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

eststo: reghdfe gini i.high_whitedead##i.post, absorb(munig post#laanig post#(c.gini_1904 c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

esttab est* using "$tables/table_OA7.tex", replace booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean") ///
	fmt(0 2 2 2)) keep(1.high_dead#1.post 1.high_insurgency#1.post 1.high_whitedead#1.post) coeflabels(1.high_dead#1.post "1[High civil war casualties] $\times$ 1[Year $\geq$ 1917]" ///
	1.high_insurgency#1.post "1[High Red casualties] $\times$ 1[Year $\geq$ 1917]" 1.high_whitedead#1.post "1[High White casualties] $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{4}{c}} \toprule) ///
	postfoot(\bottomrule \end{tabular})			

restore

********************************************************************************

* Table OA8

est clear

eststo: reghdfe share_disqualified i.high_dead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

eststo: reghdfe share_disqualified i.high_insurgency##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

eststo: reghdfe share_disqualified i.high_whitedead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

esttab est* using "$tables/table_OA8.tex", replace booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean") ///
	fmt(0 2 2 2)) keep(1.high_dead#1.post 1.high_insurgency#1.post 1.high_whitedead#1.post) coeflabels(1.high_dead#1.post "1[High civil war casualties] $\times$ 1[Year $\geq$ 1917]" ///
	1.high_insurgency#1.post "1[High Red casualties] $\times$ 1[Year $\geq$ 1917]" 1.high_whitedead#1.post "1[High White casualties] $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{4}{c}} \toprule) ///
	postfoot(\bottomrule \end{tabular})			

********************************************************************************

* Table OA9
	
est clear

eststo: reghdfe turnout i.high_dead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

eststo: reghdfe turnout i.high_insurgency##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

eststo: reghdfe turnout i.high_whitedead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd ysumm

esttab est* using "$tables/table_OA9.tex", replace booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean") ///
	fmt(0 2 2 2)) keep(1.high_dead#1.post 1.high_insurgency#1.post 1.high_whitedead#1.post) coeflabels(1.high_dead#1.post "1[High civil war casualties] $\times$ 1[Year $\geq$ 1917]" ///
	1.high_insurgency#1.post "1[High Red casualties] $\times$ 1[Year $\geq$ 1917]" 1.high_whitedead#1.post "1[High White casualties] $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{4}{c}} \toprule) ///
	postfoot(\bottomrule \end{tabular})			
	
********************************************************************************

* Figure OA14

drop high_*

foreach var of varlist dead insurgency whitedead battle_red_share battle_white_share camp_red_share murdered_red_share murdered_white_share {
	summarize `var', detail
	gen high_`var' = (`var'>=r(p50)) if `var' != .
}
	
drop treat*	
	
levelsof year, local(level)
foreach l of local level {
		gen treat_`l'=0
		replace treat_`l'=high_dead if year==`l'
	}

tempfile t1 t2
parmby "reghdfe agrarian_party treat_1910 treat_1911 treat_1913 treat_1917 treat_1919 treat_1922 treat_1924 treat_1927 treat_1929 treat_1930 treat_1933 treat_1936, a(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)

preserve
clear all
set obs 1
gen year =1916
gen estimate = 0
gen parm ="treat_1916"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^treat*")
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway (rcap min95 max95 yearstr, lwidth(medium) ylabel(,format(%9.0f)) scheme(plotplain) xsize(6) ysize(4) xtitle(Year, size(small))  yline(0, lcolor(black)) xline(1918, lcolor(black)) xline(1916.5, lcolor(black)) ytitle(Regression coefficient) ///
xlabel(1910 1911 1913 1916 1917 1919 1922 1924 1927 1929 1930 1933 1936, angle(vertical) labsize(small)) graphregion(color(white)) legend(off) ///
subtitle("Panel A: Agrarian Party vote share", position(11))) (connected estimate yearstr, msize(medium) msymbol(circle) mcolor(black))
graph save "$figures/casualties_agrarian_party_high.gph", replace
	
restore	

drop treat*

levelsof year, local(level)
foreach l of local level {
		gen treat_`l'=0
		replace treat_`l'=high_dead if year==`l'
	}

tempfile t1 t2
parmby "reghdfe right_wing treat_1910 treat_1911 treat_1913 treat_1917 treat_1919 treat_1922 treat_1924 treat_1927 treat_1929 treat_1930 treat_1933 treat_1936, a(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)

preserve
clear all
set obs 1
gen year =1916
gen estimate = 0
gen parm ="treat_1916"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^treat*")
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway (rcap min95 max95 yearstr, lwidth(medium) ylabel(,format(%9.0f)) scheme(plotplain) xsize(6) ysize(4) xtitle(Year, size(small))  yline(0, lcolor(black)) xline(1918, lcolor(black)) xline(1916.5, lcolor(black)) ytitle(Regression coefficient) ///
xlabel(1910 1911 1913 1916 1917 1919 1922 1924 1927 1929 1930 1933 1936, angle(vertical) labsize(small)) graphregion(color(white)) legend(off) ///
subtitle("Panel B: Right-wing parties' vote share", position(11))) (connected estimate yearstr, msize(medium) msymbol(circle) mcolor(black))
graph save "$figures/casualties_right_wing_high.gph", replace
	
restore	

graph combine "$figures/casualties_agrarian_party_high.gph" "$figures/casualties_right_wing_high.gph", ///
	scheme(plotplain) cols(1) xsize(16) ysize(18)
graph export "$figures/figure_OA14.pdf", as(pdf) replace

********************************************************************************

* Table OA10: See long_run_analysis.do

********************************************************************************

* Table OA11

// Generate a broader classification of "Red Finland"

replace red_region = 1 if laani == "Turun ja Porin lääni"
replace red_region = 1 if laani == "Viipurin lääni"

est clear

reg red_parties c.dead##i.post i.munig i.year, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.dead##i.post, absorb(munig year) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.insurgency##i.post i.munig i.year, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.insurgency##i.post, absorb(munig year) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.whitedead##i.post i.munig i.year, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.whitedead##i.post, absorb(munig year) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.dead##i.post i.munig i.year if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.dead##i.post if red_region == 1, absorb(munig year) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.insurgency##i.post i.munig i.year if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.insurgency##i.post if red_region == 1, absorb(munig year) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.whitedead##i.post i.munig i.year if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.whitedead##i.post if red_region == 1, absorb(munig year) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.dead##i.post i.munig i.year if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.dead##i.post if red_region == 0, absorb(munig year) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.insurgency##i.post i.munig i.year if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.insurgency##i.post if red_region == 0, absorb(munig year) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.whitedead##i.post i.munig i.year if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.whitedead##i.post if red_region == 0, absorb(munig year) vce(cluster munig)
estadd scalar beta
estadd ysumm

esttab est* using "$tables/table_OA11.tex", replace  mgroups("Entire country" "Red Finland" "White Finland",  pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) )  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(1.post#c.dead 1.post#c.insurgency 1.post#c.whitedead) coeflabels(1.post#c.dead "Civil war casualties $\times$ 1[Year $\geq$ 1917]" ///
	1.post#c.insurgency "Red casualties $\times$ 1[Year $\geq$ 1917]" 1.post#c.whitedead "White casualties $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{10}{c}} \toprule) refcat(1.post#c.dead "\textbf{Panel A:} No controls", nolabel) ///
	postfoot("")
	
est clear

reg red_parties c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.dead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.insurgency##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.whitedead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.dead##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.insurgency##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.whitedead##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.dead##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.insurgency##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.whitedead##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

esttab est* using "$tables/table_OA11.tex", append  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(1.post#c.dead 1.post#c.insurgency 1.post#c.whitedead) coeflabels(1.post#c.dead "Civil war casualties $\times$ 1[Year $\geq$ 1917]" ///
	1.post#c.insurgency "Red casualties $\times$ 1[Year $\geq$ 1917]" 1.post#c.whitedead "White casualties $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle nonumbers ///
	prehead("") refcat(1.post#c.dead "\textbf{Panel B:} Controls included", nolabel) ///
	postfoot(\bottomrule \end{tabular})
	
********************************************************************************

* Table OA12

est clear

reg red_parties c.battle_red_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.battle_red_share##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.battle_white_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.battle_white_share##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.battle_red_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.battle_red_share##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.battle_white_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.battle_white_share##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.battle_red_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.battle_red_share##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.battle_white_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.battle_white_share##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

esttab est* using "$tables/table_OA12.tex", replace  mgroups("Entire country" "Red Finland" "White Finland",  pattern(1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) )  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(1.post#c.battle_red_share 1.post#c.battle_white_share) coeflabels(1.post#c.battle_red_share "Red battle casualties $\times$ 1[Year $\geq$ 1917]" ///
	1.post#c.battle_white_share "White battle casualties $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{7}{c}} \toprule) refcat(1.post#c.battle_red_share "\textbf{Panel A:} Battle casualties", nolabel) ///
	postfoot("")		
	
est clear

reg red_parties c.murdered_red_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.murdered_red_share##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.murdered_white_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.murdered_white_share##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.murdered_red_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.murdered_red_share##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.murdered_white_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.murdered_white_share##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.murdered_red_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.murdered_red_share##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.murdered_white_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.murdered_white_share##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

esttab est* using "$tables/table_OA12.tex", append  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(1.post#c.murdered_red_share 1.post#c.murdered_white_share) coeflabels(1.post#c.murdered_red_share "Executed Reds $\times$ 1[Year $\geq$ 1917]" ///
	1.post#c.murdered_white_share "Executed Whites $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle nonumbers ///
	prehead("") refcat(1.post#c.murdered_red_share "\textbf{Panel B:} Executed", nolabel) ///
	postfoot("")
	
est clear

reg red_parties c.camp_red_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.camp_red_share##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.camp_red_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.camp_red_share##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg red_parties c.camp_red_share##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe red_parties c.camp_red_share##i.post year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, absorb(munig) vce(cluster munig)
estadd scalar beta
estadd ysumm

esttab est* using "$tables/table_OA12.tex", append  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(1.post#c.camp_red_share) coeflabels(1.post#c.camp_red_share "Prison camp deaths $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle nonumbers extracols(2 3 4) ///
	prehead("") refcat(1.post#c.camp_red_share "\textbf{Panel C:} Prison camp deaths", nolabel) ///
	postfoot("\bottomrule \end{tabular}")	

********************************************************************************

* Table OA13

// Generate changes in inequality

gen gini = gini_1904 if post == 0 
replace gini = gini_1938 if post == 1

preserve

keep if gini != .
duplicates drop municipality post, force
	
est clear

reg gini c.dead##i.post i.munig i.post#(i.laanig c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe gini c.dead##i.post, absorb(munig post#laanig post#(c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg gini c.insurgency##i.post i.munig i.post#(i.laanig c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe gini c.insurgency##i.post, absorb(munig post#laanig post#(c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg gini c.whitedead##i.post i.munig i.post#(i.laanig c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe gini c.whitedead##i.post, absorb(munig post#laanig post#(c.gini_1904 c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg gini c.dead##i.post i.munig i.post#(i.laanig c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe gini c.dead##i.post if red_region == 1, absorb(munig post#laanig post#(c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg gini c.insurgency##i.post i.munig i.post#(i.laanig c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe gini c.insurgency##i.post if red_region == 1, absorb(munig post#laanig post#(c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg gini c.whitedead##i.post i.munig i.post#(i.laanig c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe gini c.whitedead##i.post if red_region == 1, absorb(munig post#laanig post#(c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg gini c.dead##i.post i.munig i.post#(i.laanig c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe gini c.dead##i.post if red_region == 0, absorb(munig post#laanig post#(c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg gini c.insurgency##i.post i.munig i.post#(i.laanig c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe gini c.insurgency##i.post if red_region == 0, absorb(munig post#laanig post#(c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg gini c.whitedead##i.post i.munig i.post#(i.laanig c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe gini c.whitedead##i.post if red_region == 0, absorb(munig post#laanig post#(c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

esttab est* using "$tables/table_OA13.tex", replace  mgroups("Entire country" "Red Finland" "White Finland",  pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) )  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(1.post#c.dead 1.post#c.insurgency 1.post#c.whitedead) coeflabels(1.post#c.dead "Civil war casualties $\times$ 1[Year $\geq$ 1917]" ///
	1.post#c.insurgency "Red casualties $\times$ 1[Year $\geq$ 1917]" 1.post#c.whitedead "White casualties $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{10}{c}} \toprule) ///
	postfoot(\bottomrule \end{tabular})			

restore

********************************************************************************

* Table OA14

est clear

reg turnout c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe turnout c.dead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg turnout c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe turnout c.insurgency##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg turnout c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe turnout c.whitedead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg turnout c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe turnout c.dead##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg turnout c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe turnout c.insurgency##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg turnout c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe turnout c.whitedead##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg turnout c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe turnout c.dead##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg turnout c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe turnout c.insurgency##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg turnout c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe turnout c.whitedead##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

esttab est* using "$tables/table_OA14.tex", replace  mgroups("Entire country" "Red Finland" "White Finland",  pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) )  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(1.post#c.dead 1.post#c.insurgency 1.post#c.whitedead) coeflabels(1.post#c.dead "Civil war casualties $\times$ 1[Year $\geq$ 1917]" ///
	1.post#c.insurgency "Red casualties $\times$ 1[Year $\geq$ 1917]" 1.post#c.whitedead "White casualties $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{10}{c}} \toprule) ///
	postfoot(\bottomrule \end{tabular})			

********************************************************************************

* Table OA15

est clear

reg share_disqualified c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe share_disqualified c.dead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg share_disqualified c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe share_disqualified c.insurgency##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg share_disqualified c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m), beta
scalar beta = r(PT)[5,6]
eststo: reghdfe share_disqualified c.whitedead##i.post, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg share_disqualified c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe share_disqualified c.dead##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg share_disqualified c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe share_disqualified c.insurgency##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg share_disqualified c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 1, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe share_disqualified c.whitedead##i.post if red_region == 1, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg share_disqualified c.dead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe share_disqualified c.dead##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg share_disqualified c.insurgency##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe share_disqualified c.insurgency##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

reg share_disqualified c.whitedead##i.post i.munig i.year#(i.laanig c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m) if red_region == 0, beta
scalar beta = r(PT)[5,6]
eststo: reghdfe share_disqualified c.whitedead##i.post if red_region == 0, absorb(munig year#laanig year#(c.gini_1904 c.pop_present_all c.lat c.lon c.slope_mean c.altitude_m)) vce(cluster munig)
estadd scalar beta
estadd ysumm

esttab est* using "$tables/table_OA15.tex", replace  mgroups("Entire country" "Red Finland" "White Finland",  pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) )  booktabs   ///
	compress lines star(* .1 ** .05 *** .01) ///
	b(%9.3f) se(%9.3f) stats(N r2 ymean beta, labels("\textit{N}"  "\textit{R\textsuperscript{2}}" "Outcome mean" "Standardized effect size") ///
	fmt(0 2 2 2)) keep(1.post#c.dead 1.post#c.insurgency 1.post#c.whitedead) coeflabels(1.post#c.dead "Civil war casualties $\times$ 1[Year $\geq$ 1917]" ///
	1.post#c.insurgency "Red casualties $\times$ 1[Year $\geq$ 1917]" 1.post#c.whitedead "White casualties $\times$ 1[Year $\geq$ 1917]") nodepvars nomtitle ///
	prehead(\begin{tabular}{l*{10}{c}} \toprule) ///
	postfoot(\bottomrule \end{tabular})
	
********************************************************************************

* Table OA16: See long_run_analysis.do!
